.class public Lrexsee/core/application/RexseeConfiguration;
.super Ljava/lang/Object;
.source "RexseeConfiguration.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final INTERFACE_NAME:Ljava/lang/String; = "Configuration"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 1
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 27
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 28
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    .line 29
    iput-object p1, p0, Lrexsee/core/application/RexseeConfiguration;->mBrowser:Lrexsee/core/browser/Browser;

    .line 30
    return-void
.end method

.method public static getOrientation(I)Ljava/lang/String;
    .locals 1
    .param p0, "orientation"    # I

    .prologue
    .line 33
    packed-switch p0, :pswitch_data_0

    .line 41
    const-string v0, "undefined"

    :goto_0
    return-object v0

    .line 35
    :pswitch_0
    const-string v0, "landscape"

    goto :goto_0

    .line 37
    :pswitch_1
    const-string v0, "portrait"

    goto :goto_0

    .line 39
    :pswitch_2
    const-string v0, "square"

    goto :goto_0

    .line 33
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method


# virtual methods
.method public getFontScale()F
    .locals 2

    .prologue
    .line 48
    iget-object v1, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 49
    .local v0, "c":Landroid/content/res/Configuration;
    iget v1, v0, Landroid/content/res/Configuration;->fontScale:F

    return v1
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 18
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 14
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/application/RexseeConfiguration;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Configuration"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getKeyboard()Ljava/lang/String;
    .locals 2

    .prologue
    .line 60
    iget-object v1, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 61
    .local v0, "c":Landroid/content/res/Configuration;
    iget v1, v0, Landroid/content/res/Configuration;->keyboard:I

    packed-switch v1, :pswitch_data_0

    .line 67
    const-string v1, "none"

    :goto_0
    return-object v1

    .line 63
    :pswitch_0
    const-string v1, "12"

    goto :goto_0

    .line 65
    :pswitch_1
    const-string v1, "qwerty"

    goto :goto_0

    .line 61
    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public getNavigation()Ljava/lang/String;
    .locals 2

    .prologue
    .line 71
    iget-object v1, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 72
    .local v0, "c":Landroid/content/res/Configuration;
    iget v1, v0, Landroid/content/res/Configuration;->navigation:I

    packed-switch v1, :pswitch_data_0

    .line 80
    const-string v1, "none"

    :goto_0
    return-object v1

    .line 74
    :pswitch_0
    const-string v1, "dpad"

    goto :goto_0

    .line 76
    :pswitch_1
    const-string v1, "trackball"

    goto :goto_0

    .line 78
    :pswitch_2
    const-string v1, "wheel"

    goto :goto_0

    .line 72
    nop

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 22
    new-instance v0, Lrexsee/core/application/RexseeConfiguration;

    invoke-direct {v0, p1}, Lrexsee/core/application/RexseeConfiguration;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getOrientation()Ljava/lang/String;
    .locals 1

    .prologue
    .line 85
    iget-object v0, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    iget v0, v0, Landroid/content/res/Configuration;->orientation:I

    invoke-static {v0}, Lrexsee/core/application/RexseeConfiguration;->getOrientation(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getTouchScreen()Ljava/lang/String;
    .locals 2

    .prologue
    .line 88
    iget-object v1, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 89
    .local v0, "c":Landroid/content/res/Configuration;
    iget v1, v0, Landroid/content/res/Configuration;->touchscreen:I

    packed-switch v1, :pswitch_data_0

    .line 95
    const-string v1, "none"

    :goto_0
    return-object v1

    .line 91
    :pswitch_0
    const-string v1, "finger"

    goto :goto_0

    .line 93
    :pswitch_1
    const-string v1, "stylus"

    goto :goto_0

    .line 89
    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public isHardKeyboardHidden()Z
    .locals 3

    .prologue
    .line 52
    iget-object v1, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 53
    .local v0, "c":Landroid/content/res/Configuration;
    iget v1, v0, Landroid/content/res/Configuration;->hardKeyboardHidden:I

    const/4 v2, 0x2

    if-ne v1, v2, :cond_0

    const/4 v1, 0x1

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public isKeyboardHidden()Z
    .locals 3

    .prologue
    .line 56
    iget-object v1, p0, Lrexsee/core/application/RexseeConfiguration;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 57
    .local v0, "c":Landroid/content/res/Configuration;
    iget v1, v0, Landroid/content/res/Configuration;->keyboardHidden:I

    const/4 v2, 0x2

    if-ne v1, v2, :cond_0

    const/4 v1, 0x1

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method
